﻿using Model.Base;
using System.Collections.Generic;

namespace IDAL
{
    public interface IExSelectADO<T> where T : class, new()
    {
        /// <summary>
        /// 根据条件获取一个包含全部查询结果的DataTable
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        System.Data.DataTable GetTable(T m);
        System.Data.DataTable GetTable(string strWhere, Dictionary<string, object> paramFields);
        /// <summary>
        /// 根据条件获取一个包含全部查询结果的List数集
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="m"></param>
        /// <returns></returns>
        List<T> GetList(T m);
        List<T> GetList(string strWhere, Dictionary<string, object> paramFields);
        /// <summary>
        /// 根据条件分页获取一个包含查询结果的DataTable
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="p"></param>
        /// <param name="t"></param>
        /// <returns></returns>
        System.Data.DataTable GetListByPage(Common.DB.Paging p, T m);
        System.Data.DataTable GetListByPage(Common.DB.Paging p, string strWhere, Dictionary<string, object> paramFields);
    }
}
